/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entity;

import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import type.Month;
import type.SalesOrderType;

/**
 *
 * @author wei
 */
@Entity(name="SaleOrderReport")
public class SaleOrderReportEntity extends DataObjectEntity implements Serializable {
    @ManyToOne
    private CompletedGoodsEntity product;
    private int yearOfSales;
    private Month monthOfSales;
    private long quantity;
    private SalesOrderType type;

    public SaleOrderReportEntity() {
        super();
    }

    public Month getMonthOfSales() {
        return monthOfSales;
    }

    public void setMonthOfSales(Month monthOfSales) {
        this.monthOfSales = monthOfSales;
    }

    public CompletedGoodsEntity getProduct() {
        return product;
    }

    public void setProduct(CompletedGoodsEntity product) {
        this.product = product;
    }

    public long getQuantity() {
        return quantity;
    }

    public void setQuantity(long quantity) {
        this.quantity = quantity;
    }

    public SalesOrderType getType() {
        return type;
    }

    public void setType(SalesOrderType type) {
        this.type = type;
    }

    public int getYearOfSales() {
        return yearOfSales;
    }

    public void setYearOfSales(int yearOfSales) {
        this.yearOfSales = yearOfSales;
    }

    @Override
    public String childToString() {
        return "SaleOrderReportEntity{" + "product=" + product + ", yearOfSales=" + yearOfSales + ", monthOfSales=" + monthOfSales + ", quantity=" + quantity + ", type=" + type + '}';
    }
    
}
